#include<iostream>
#include<algorithm>
using namespace std;
typedef long long LL;
const int N = 1010;
int arr[N];
int n, m;
int work(int k, bool flag = false)
{
	int res = 0;
	for (int i = 1; i <= n; i++) {
		int b = arr[k] + (i - k) * m;
		if (b <= 0) {
			return n;
		}
		if (b != arr[i]) {
			res++;
			if (flag) {
				if (b > arr[i]) {
					cout << "+ " << i << " " << b - arr[i] << endl;
				}
				else {
					cout << "- " << i << " " << arr[i] - b << endl;
				}
			}
		}
	}
	return res;
}
int main()
{
	cin >> n >> m;
	for (int i = 1; i <= n; i++) {
		cin >> arr[i];
	}
	int res = n;
	for (int i = 1; i <= n; i++) {
		res = min(res, work(i));
	}
	cout << res << endl;
	for (int i = 1; i <= n; i++) {
		if (work(i) == res) {
			work(i, true);
			break;
		}
	}
	return 0;
}